/*
 * GeoVISTA Center (Penn State, Dept. of Geography)
 * Copyright (c), 2003-2011,  Jin Chen and Alan M. MacEachren, GeoVISTA Center, Penn State University
 * All Rights Researved.
 *
 * This library is developed and distributed for free usage,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * You can redistribute and/or modify it under the terms of the
 * Simplified BSD License
 *
 *
 *
 *
 *
 *
 *
 *
 * @Original Author: jin Chen
 * @date: Apr 6, 2004$
 * @version: 1.0
 */
package edu.psu.geovista.app.dataloader.v1.actions;

import edu.psu.geovista.app.dataloader.v1.DataLoaders;
import edu.psu.geovista.app.dataloader.v1.config.model.Project;

import java.awt.event.ActionEvent;

public class SetPath80 extends BasicAction{
    public SetPath80() {
    }

    public SetPath80(String name, DataLoaders dl) {
        super(name,dl);

        //setProjectPaneNameList();

    }
    //add project names to the project pane
   /* private void setProjectPaneNameList(){
        String [] names=projBd.getConfiguror().getProjectIDs();
        projp.setProjectNames(names);
    }*/
    //customize load project config
    public void actionPerformed(ActionEvent e) {
        processInfoFromPreviousPage();

               //String projectname=this.dataloader.getProjectPane().getSelectedProjectName();
        //2. fill info to next GUI
        boolean success=processInfoForNextPage() ;
        if(success)
        doNext();

    }

    protected void processInfoFromPreviousPage(){
        // 
        //1. get info from previous GUI
        boolean loadpcp = this.dataloader.getChooseDataPane().isPcpDataLoad();
        boolean loadts = this.dataloader.getChooseDataPane().isTsDataLoad();

        this.wizardData.setLoadPcpdata(loadpcp);
        this.wizardData.setLoadTsdata(loadts);
    }
    protected boolean processInfoForNextPage(){


        Project projectClone = wizardData.getProjectClone();
        return dataloader.setDataInfo(projectClone) ;
    }

    protected void doNext(){
      //  System.out.println("do next");
        dataloader.showPathDlg();
    }

}
